/* 保持原来的样式不变，只做少量调整 */

:root {
    --primary-color: #2d3e50;
    --secondary-color: #f9fafc;
    --accent-color: #2d8cf0;
    --hover-color: #1971c2;
    --text-dark: #333;
    --text-light: #666;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.2);
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: var(--secondary-color);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.navbar {
    width: 100%;
    background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    padding: 15px 0;
}

.navbar a {
    color: var(--white);
    padding: 10px 20px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.navbar a:hover {
    background-color: #1a2a3b;
    border-radius: 5px;
}

.container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    margin-top: 50px;
}

.sidebar {
    width: 20%;
    background-color: var(--white);
    padding: 15px;
    box-shadow: 0 4px 8px var(--shadow);
}

.user-nav {
    display: flex;
    flex-direction: column;
}

.user-nav .nav-item {
    padding: 10px;
    font-size: 1.2em;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.user-nav .nav-item:hover {
    background-color: var(--accent-color);
    color: var(--white);
}

.main-content {
    width: 80%;
    padding: 20px;
}

.profile, .edit, .logout, .logoff {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--shadow);
    margin-bottom: 30px;
}

.profile .title {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.profile p {
    font-size: 1em;
    color: var(--text-dark);
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

.form-buttons {
    display: flex;
    justify-content: space-between;
}

.btn-primary {
    font-size: 1em;
    padding: 10px 20px;
    color: var(--white);
    background-color: var(--accent-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: var(--hover-color);
}

.btn-secondary, .btn-danger {
    font-size: 1em;
    padding: 10px 20px;
    color: var(--white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* 基本布局 */
.container {
    display: flex;
    padding: 20px;
}

.sidebar {
    width: 20%;
    padding: 20px;
    background-color: #f4f4f4;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.main-content {
    width: 80%;
    padding: 20px;
}

.user-nav {
    display: flex;
    flex-direction: column;
}

.user-nav .nav-item {
    text-decoration: none;
    color: #333;
    padding: 10px 20px;
    margin: 10px 0;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.user-nav .nav-item:hover {
    background-color: #f0f0f0;
}

/* 编辑信息表单样式 */
#edit {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#edit h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

form label {
    display: block;
    font-size: 16px;
    margin: 10px 0 5px;
    color: #555;
}

form input,
form select,
form textarea {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 15px;
}

form textarea {
    resize: vertical;
    height: 100px;
}

form input[type="file"] {
    padding: 5px;
    border: none;
}

.form-buttons {
    display: flex;
    justify-content: space-between;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #f8f9fa;
    color: #333;
}

.btn-secondary:hover {
    background-color: #e2e6ea;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        margin-bottom: 20px;
    }

    .main-content {
        width: 100%;
    }

    form input,
    form select,
    form textarea {
        font-size: 14px;
    }

    button {
        font-size: 14px;
    }
}
